You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, is it possible to use Promises in Application Extensions (i.e. Siri Intents or Today Extension)?
I'm using Promises for my network layer which is shared using a framework.
The Promises library is used with the help of CocoaPods.
The app is organized in the following manner: AppNameKit - Core framework with networking and logic AppName - The application itelf AppIntent - The Siri intent AppIntentUI - The UI component of the Siri Intent.
While the framework is linked correctly and the app works fine, I got the error when I try to use the AppNameKit in AppIntent.
I can import Promises in the AppIntent, but whenever I use the code that actually uses Promise as its return value, I get the error:
ld: warning: linking against a dylib which is not safe for use in application extensions: /Users/richard/Library/Developer/Xcode/DerivedData/AppName-akvlogsasqbqhhgohvikypiqacwv/Build/Products/Debug-iphonesimulator/AppNameKit.framework/AppNameKit
ld: warning: Could not find auto-linked framework 'KeychainAccess'
ld: warning: Could not find auto-linked framework 'Kingfisher'
ld: warning: Could not find auto-linked framework 'Promises'
ld: warning: Could not find auto-linked framework 'FBLPromises'
ld: warning: Could not find auto-linked framework 'JWTDecode'
ld: warning: Could not find auto-linked framework 'Alamofire'
Undefined symbols for architecture x86_64:"static (extension in Promises):__C.OS_dispatch_queue.promises.getter : __C.OS_dispatch_queue", referenced from:
default argument 0 of Promises.Promise.then(on: __C.OS_dispatch_queue, _:(A) throws ->())-> Promises.Promise<A>in PhoneBalanceIntentHandler.o
"Promises.Promise.then(on: __C.OS_dispatch_queue, _: (A) throws -> ()) -> Promises.Promise<A>", referenced from:
AppNameIntent.PhoneBalanceIntentHandler.handle(intent:AppNameKit.ViewBalanceIntent, completion:(AppNameKit.ViewBalanceIntentResponse)->())->() in PhoneBalanceIntentHandler.o(maybe you meant: _$S8Promises7PromiseC4then2on_ACyxGSo17OS_dispatch_queueC_yxKctFfA_)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1(use -v to see invocation)
What could be the reason for such result? What is the best way to use Promises in such a configuration (shared networking & logic core, multiple targets - app, extension, intents...)?
Are Promises safe to be used in App Extensions?
The text was updated successfully, but these errors were encountered:
Promises are used in Google's app extensions. We don't use any app-specific APIs and have APPLICATION_EXTENSION_API_ONLY flags set in xcodeproj.
Your error looks like the lib is being missing during the linkage stage. Hope you were able to setup the project in such a way that Promises lib gets linked against your target.
Hi, is it possible to use Promises in Application Extensions (i.e. Siri Intents or Today Extension)?
I'm using Promises for my network layer which is shared using a framework.
The Promises library is used with the help of CocoaPods.
The app is organized in the following manner:
AppNameKit
- Core framework with networking and logicAppName
- The application itelfAppIntent
- The Siri intentAppIntentUI
- The UI component of the Siri Intent.While the framework is linked correctly and the app works fine, I got the error when I try to use the
AppNameKit
inAppIntent
.I can
import Promises
in theAppIntent
, but whenever I use the code that actually usesPromise
as its return value, I get the error:What could be the reason for such result? What is the best way to use Promises in such a configuration (shared networking & logic core, multiple targets - app, extension, intents...)?
Are Promises safe to be used in App Extensions?
The text was updated successfully, but these errors were encountered: