время выполнения вывода objc[69590] при использовании CocoaPods с 2 проектами
Я создал 2 проекта xcode "mylib" и "myapp"
- тип проекта mylib - "iOS - > Cocoa Touch Framework "
- и тип проекта myapp - " iOS - > Application - > Single View Application".
Оба проекта зависят от" AFNetworking", поэтому я написал Подфайл ниже.
workspace 'myapp'
platform :ios,'7.0'
xcodeproj 'myapp/myapp.xcodeproj'
target :myapp do
xcodeproj 'myapp/myapp.xcodeproj'
pod 'AFNetworking', '~> 2.5.4'
end
target :mylib do
xcodeproj 'mylib/mylib.xcodeproj'
pod 'AFNetworking', '~> 2.5.4'
end
После запуска "pod install", я получил https://github.com/everettjf/cocoapods_two_projects_obj69272 , и строить без ошибки.
Но когда я запускаю "симулятор iOS", в окне консоли появляется много предупреждающих сообщений.
objc[69590]: Class AFHTTPRequestOperation is implemented in both /Users/everettjf/Library/Developer/Xcode/DerivedData/myapp-exzydcmjfladtpgxcrxfchlkcmux/Build/Products/Debug-iphonesimulator/mylib.framework/mylib and /Users/everettjf/Library/Developer/CoreSimulator/Devices/409F22C7-031F-495C-BE66-EE4712D0D469/data/Containers/Bundle/Application/A94992B7-C057-4842-9B64-D8B8E2E5E4DE/myapp.app/myapp. One of the two will be used. Which one is undefined.
objc[69590]: Class AFHTTPRequestOperationManager is implemented in both /Users/everettjf/Library/Developer/Xcode/DerivedData/myapp-exzydcmjfladtpgxcrxfchlkcmux/Build/Products/Debug-iphonesimulator/mylib.framework/mylib and /Users/everettjf/Library/Developer/CoreSimulator/Devices/409F22C7-031F-495C-BE66-EE4712D0D469/data/Containers/Bundle/Application/A94992B7-C057-4842-9B64-D8B8E2E5E4DE/myapp.app/myapp. One of the two will be used. Which one is undefined.
objc[69590]: Class AFHTTPSessionManager is implemented in both /Users/everettjf/Library/Developer/Xcode/DerivedData/myapp-exzydcmjfladtpgxcrxfchlkcmux/Build/Products/Debug-iphonesimulator/mylib.framework/mylib and /Users/everettjf/Library/Developer/CoreSimulator/Devices/409F22C7-031F-495C-BE66-EE4712D0D469/data/Containers/Bundle/Application/A94992B7-C057-4842-9B64-D8B8E2E5E4DE/myapp.app/myapp. One of the two will be used. Which one is undefined.
objc[69590]: Class AFNetworkActivityIndicatorManager is implemented in both /Users/everettjf/Library/Developer/Xcode/DerivedData/myapp-exzydcmjfladtpgxcrxfchlkcmux/Build/Products/Debug-iphonesimulator/mylib.framework/mylib and /Users/everettjf/Library/Developer/CoreSimulator/Devices/409F22C7-031F-495C-BE66-EE4712D0D469/data/Containers/Bundle/Application/A94992B7-C057-4842-9B64-D8B8E2E5E4DE/myapp.app/myapp. One of the two will be used. Which one is undefined.
...(more)
Как я мог это исправить ? Спасибо.
2 ответа:
Создайте pod отдельно для обоих проектов.
Используйте эту ссылку для ссылки: http://www.raywenderlich.com/64546/introduction-to-cocoapods-2