When using Xcode 11.3 and running on watchOS 6.1.1, I see the following conflicts
objc[45250]: Class AVAssetDownloadTask is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/watchOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CFNetwork.framework/CFNetwork (0x4ddd0ec) and /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/watchOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/AVFoundation.framework/AVFoundation (0x16aea494). One of the two will be used. Which one is undefined.
objc[45250]: Class AVAssetDownloadURLSession is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/watchOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/CFNetwork.framework/CFNetwork (0x4dddd44) and /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/watchOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/AVFoundation.framework/AVFoundation (0x16aea4bc). One of the two will be used. Which one is undefined.
Then my URLSession code stops working
2020-01-13 22:50:12.430920+0100 MyAppWatch WatchKit Extension[45250:2099229] Task <3CECDE81-59B9-4EDE-A4ED-1BA173646037>.<1> finished with error [-999] Error Domain=NSURLErrorDomain Code=-999 "cancelled" UserInfo={NSErrorFailingURLKey=https://myapp.com/def.json, NSErrorFailingURLStringKey=https://myapp.com/def.json, NSLocalizedDescription=cancelled}
It works perfectly on watchOS 6.0 and before, this is probably due to URLSession classes conflicts. How to solve this?
Related
When I run SKProductsRequest from UI Tests session in Xcode 12 GM, it always fails with this error:
Error Domain=SKErrorDomain Code=0 "UNKNOWN_ERROR" UserInfo={NSLocalizedDescription=UNKNOWN_ERROR, NSUnderlyingError=0x600003d30f30 {Error Domain=ASDErrorDomain Code=507 "Error decoding object" UserInfo={NSLocalizedDescription=Error decoding object, NSLocalizedFailureReason=Attempted to decode store response}}}
I tried to use SKTestSession with valid .storekit configuration file, but it didn't help. Though in my Unit Tests this works fine with SKTestSession.
Is there a way to test store in UI tests in Xcode 12 GM? Or SKTestSession is usable only in Unit Tests?
So after few days of digging seems like I found out what to do to make it work. You just need to add some delay before running SKProductsRequest at app launch. I set 5 seconds delay just for UI tests — and that's it! Now my request works!
That's the line needed for the request to run without errors:
// Wait for StoreKitTest
Thread.sleep(forTimeInterval: 5)
// Start request
request.start()
So I've tried to follow this
http://www.mokacoding.com/blog/setting-up-firebase-without-cocoapods/
And then this https://facebook.github.io/react-native/docs/linking-libraries-ios.html
Firebase SDK seems to be loaded, XCode says:
2017-06-18 19:35:49.969 myapp[2224]
[Firebase/Analytics][I-ACS005000] The AdSupport Framework is not
currently linked. Some features will not function properly. Learn more
at (stackoverflow forbids shorteners)
2017-06-18 19:35:49.971 myapp[2224]
[Firebase/Analytics][I-ACS023007] Firebase Analytics v.4001000 started
Then I'm getting a "Native module cannot be null" red screen after React Native loads.
XCode says:
2017-06-18 19:48:39.975 [info][tid:main][RCTCxxBridge.mm:184]
Initializing (parent: , executor: (null))
2017-06-18 19:48:39.980 [warn][tid:main][RCTBridge.m:114] Class
RCTCxxModule was not exported. Did you forget to use
RCT_EXPORT_MODULE()?
2017-06-18 19:48:39.994 [info][tid:main][RCTRootView.m:302] Running
application myapp ({
initialProps = {
};
rootTag = 1; })
2017-06-18 19:48:40.305 [error][tid:com.facebook.React.JavaScript]
Native module cannot be null.
Did anyone have better luck than me?
I am building an iOS app with Xamarin and MvvmCross the required the use of Bluetooth LE. I am trying to use this plugin:
https://github.com/aritchie/bluetoothle
Here is my code:
var server = CrossBleAdapter.Current.CreateGattServer();
await server.Start(new AdvertisementData()); // throws exception
It throws an exception when trying to start the server:
{System.ArgumentException: Invalid State - Unknown at
Plugin.BluetoothLE.Server.GattServer.Start
(Plugin.BluetoothLE.Server.AdvertisementData adData) [0x0005f] in
<4281c4bd57f24525b20baae1afdf610b>:0
Apparently this plugin is easy to use so I must be missing something obvious?
That Exception indicates that the hardware is in invalid or initializing state and can be seen here: https://github.com/aritchie/bluetoothle/blob/master/Plugin.BluetoothLE.Apple.Shared/Server/GattServer.cs#L74
if (this.manager.State != CBPeripheralManagerState.PoweredOn)
throw new ArgumentException("Invalid State - " + this.manager.State);
I believe this is a bug in the code as it does not wait for the delegate to signal that the State has changed.
I found a solution. Instead of placing the code in my Core project, I placed it inside the iOS project itself, in a ViewDidAppear function, and placed a global variable in my UIViewController class:
private IGattServer server = CrossBleAdapter.Current.CreateGattServer();
I think you need to access the adapter with the appropriate thread, or at the appropriate time (after other initialization), hence why it was crashing before. I couldn't find an appropriate place to put this in my Core project, so I'm not sure if I have to put this code in each platform. Anyhow here's a solution for anyone else with this problem.
I'm trying to authenticate the local player using swift, but every time I get a false value for the .authenticated property. Here is the code I'm using, it is called by the main view controller when the app starts.
func authenticateLocalPlayer(){
var localPlayer = GKLocalPlayer()
localPlayer.authenticateHandler = {(viewController, error) -> Void in
if viewController {
self.presentViewController(viewController, animated: true, completion: nil)
}else{
println((GKLocalPlayer().authenticated))
}
}
}
It brings up the log in view just fine, but when I enter a test account login, it just returns the GKLocalPlayer().authenticatedas false. The bundle identifier in iTunes Connect and the info.plist are exactly the same, as is the version and the app name. Everything is enabled for Game Center on iTunes Connect and in Xcode, but I have a feeling it's not a coding error, it's a setup error in the app record somewhere but I can't for the life of me find where.
After further tinkering, I'm getting this error:
Error Domain=GKErrorDomain Code=15 "The requested operation could not be completed because this application is not recognized by Game Center." UserInfo=0x17006b300 {NSLocalizedDescription=The requested operation could not be completed because this application is not recognized by Game Center.}
I have no idea why this is the case, the bundle ID, name and versions all match...
Any help would be greatly appreciated.
This issue has been resolved by Apple - just call:
GKLocalPlayer.localPlayer()
Previously, the issue was that GKLocalPlayer() does not return the GKLocalPlayer singleton, but instead returns a new GKLocalPlayer instance.
If you were on the Xcode 6 BETA, you could add a C function or Objective-C method that returns the real GKLocalPlayer singleton, then use this in Swift. This is the gist of my workaround (with bad naming conventions):
In an Objective-C header:
GKLocalPlayer *getLocalPlayer(void);
In an Objective-C implementation:
GKLocalPlayer *getLocalPlayer(void) {
return [GKLocalPlayer localPlayer];
}
In your bridging header:
#import "ThatHeader.h"
Then whenever you need to access the GKLocalPlayer singleton in Swift, you can just use getLocalPlayer() instead of GKLocalPlayer(). It's probably a better idea to stick that in an method of a GKLocalPlayer category.
However, this is no longer necessary as detailed above.
Even with Xcode 6 Beta 6, on a device using iOS 8 beta 5, making GKLocalPlayer.localPlayer() available, I was still getting the error:
"NSLocalizedDescription=The requested operation could not be completed
because this application is not recognized by Game Centre"
The solution (discovered through Apple's Dev forum) was to go to "Settings" on the device, and then into "Game Centre" and enable "Sandbox" under the developer section.
You can use that, I create a simple class for iOS game center in GitHub
Easy Class Game Center Swift
https://github.com/DaRkD0G/Easy-Game-Center-Swift
Hello stackoverflow members,
This is my first time using PhoneGap, and after creating a project "Hello World", and opening it with Xcode, I get these build errors when I try to run it in the simulator:
Unknown type name '_commandQueue'; did you mean 'CDVCommandQueue'?
Expected identifier or '('
Unknown receiver '_commandQueue'; did you mean 'CDVCommandQueue'?
No known class method for selector 'resetRequestId'
Unknown receiver '_commandQueue'; did you mean 'CDVCommandQueue'?
No known class method for selector 'fetchCommandsFromJs'
Unknown receiver '_commandQueue'; did you mean 'CDVCommandQueue'?
No known class method for selector 'dispose'
Property 'commandQueue' requires method 'commandQueue' to be defined - use #synthesize, #dynamic or provide a method implementation in this class implementation
Does anyone here have an idea of how to fix these errors by any chance?
I am using Xcode v4.3.3 and the latest version of PhoneGap.
Thank you for your time,
Jonathan.
Add the line
#synthesize commandQueue = _commandQueue;
before the __init method and rebuild.