Watchkit & Realm 0.92.3

前端 未结 2 1802
醉梦人生
醉梦人生 2020-12-11 22:47

The Swift integration of a new Realm-DB (realm 0.92.3) under Xcode 6.3 and iOS10.10.3 basically works for the iPhone (not for the Apple-Watch yet). The integration of the sa

2条回答
  •  被撕碎了的回忆
    2020-12-11 23:12

    This Podfile finally did it for me (see below). Everything worked after that... To install just open a terminal, go to your App's folder (where you place the Podfile) and type

    pod install
    

    After that make sure to open from now on the "MyApp.xcworkspace" (no longer "MyApp.xcodeproj") and you are all set !

    Here is the podfile that worked :

    xcodeproj 'MyApp.xcodeproj'
    workspace 'MyApp.xcworkspace'
    platform :ios, '8.3'
    
    source 'https://github.com/artsy/Specs.git'
    source 'https://github.com/CocoaPods/Specs.git'
    
    use_frameworks!
    link_with 'MyApp', 'MyApp WatchKit Extension'
    
    def shared_pods
          pod 'RealmSwift', '>= 0.93.2'
    end
    
    target 'MyApp' do
        shared_pods
    end
    
    target 'MyAppTests' do
        shared_pods
    end
    
    target 'MyApp WatchKit Extension' do
        shared_pods
    end
    

提交回复
热议问题