Realm-cocoa: librealm-ios file is using 48 mb

Created on 2 Feb 2016  路  9Comments  路  Source: realm/realm-cocoa

Hi, i just install realm using cocoa pods, (the swift version) and there's a librealm-ios.a file adding 48 mb to my app, there is any way solve this problem, my final ipa is too big

T-Help

Most helpful comment

Not having the Pods folder in git is part of a separate discussion and not necessarily good advice. It depends on how your dev team handles Cocoapods projects. If you check in the folder builds on the build server will be faster and not all developers need Cocoapods installed.

All 9 comments

You wrote you're using the Swift version, so I'm assuming you mean the RealmSwift.podspec, is that right? Because then you can only integrate with use_frameworks! in your Podfile with CocoaPods, which wouldn't produce any static library artifacts as librealm-ios.a. Do you have perhaps embedded Realm's prebuilt binaries before using CocoaPods and the static library is left from that? Beside that my final question would be, how is your final ipa too big? Is it iTunes Connect / Xcode complaining when you're trying to upload the binary. Since introduction of bitcode the size of binaries have definitively increased, but that is only the size, you ship to the app store. The actual app download will be much smaller.

this is my podfile, xcode is giving me a size warning, the actual download is still to big, but without realm is just 16 mb
i haven't do anything weird with the instalation only added the pod 'RealmSwift' and run pod install

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

target 'gasmov' do
pod 'Alamofire'
pod 'SWXMLHash'
pod "SwiftPages"
pod 'ImageLoader'
pod "MaterialKit", :git => "https://github.com/reesemclean/MaterialKit", :branch => "swift_2"
pod "SwiftyJSON", :git => "https://github.com/SwiftyJSON/SwiftyJSON.git"
pod 'CocoaLumberjack/Swift'
pod 'AEXML'
pod 'RealmSwift'
pod 'Popover'
pod 'ActionSheetPicker-3.0'
pod "GMStepper"
end

How did you found about librealm-ios.a? That is not part of your built app bundle, right? It is expected to be located in your Pods directory, but it is compiled into Realm.framework. Could you please make a full clean, archive again and report after that the size of Realm.framework and RealmSwift.framework from your build directory?

just did a full clean, still no luck, i'm going to try with the new version 0.98

Did integrating 0.98 help @jplazcano87?

the problem was fixed by deleting derived data, for some reason it has duplicates build info.
thanks for your help!

Hi.
My librealm-ios.a is 51,8 MB large! Using 'RealmSwift' as a dependency in my project. Already removed derived data, removed the hold Pods folder and installed pods from scratch.

Installing Realm (1.0.1)
Installing RealmSwift (1.0.1)

this is not a problem, you only should be worried if your final ipa file size is too big, so i recommend uploading this to testflight and check if you see anything unsual.

also you should ignore your pod folder in your .gitignore file to avoid this heavy file

sorry about the english, i'm from chile

Not having the Pods folder in git is part of a separate discussion and not necessarily good advice. It depends on how your dev team handles Cocoapods projects. If you check in the folder builds on the build server will be faster and not all developers need Cocoapods installed.

Was this page helpful?
0 / 5 - 0 ratings