try this,
ionic start new_project --v2
ionic plugin add cordova-plugin-file (in your new_project dir)
declare let cordova:any; below import in your home.ts
then add this in your HomePage class constructor:
console.log(cordova.file.dataDirectory); //and make app stuck in white screen forever.
5.ionic run ios (in my case iOS simulator runs) ('ionic platform add ios' if not there)
I did nothing special. I have no problem on android. Any work arounds for iOS?
Related
Xcode 12.0 (12A7208)
MacOS 10.15.6 (19G2021)
Create an new SwiftUI project.
Add Capability App Groups.
Create an new Target Widget Extension, add Capability App Groups.
In Main App use UserDefaults(suiteName:).set to save an Int data.
In Widget, Under getTimeline(for:in:completion:) function just call UserDefaults(suiteName:).value,cannot get the Int Data. But in Main App can.
suiteName is started with group., and it is same in Widget and Main App.
quite confused...
For any future readers I found this error - "Code Signing Error - Verify the value of the CODE_SIGN_ENTITLEMENTS" which was in a very un-obvious place.
To fix:
Go to your new Target
Go to Build Settings
Go to the Signing section. Make sure you have an .entitlement file assigned to both Release and Debug. An entitlement file should've been automatically created in your folder structure. You just need to make sure you get the path correct eg. "Widget/WidgetExtension.entitlement"
I intend to create an app that will be overlayed on top of the normal "home" Android screen.
I have only seen this done before with the Facebook Messenger app: it puts a floating, draggable icon in the homescreen whenever I get a message, and if touched it opens on top of everything else.
I would like to make an app that can show animated graphics similarly floating around on top of the homescreen, with user interaction possible.
My most preferred way would be with Adobe AIR. :-) But that might be too much to ask. :-)
My second best preferred way to do it would be through Visual Studio 2015 C++, i.e. the Android NDK. Is it possible? Or is the standard Java SDK the only way to go?
Bonus PS. I haven't said anything about iOS cause I assume it is not possible at all on that platform. Or is it?
I created an iMessage extension from the XCode 8 beta wizard and added every single icon size to the Assets.xcassets.
Everything looks perfect on XCode and when I run the iMessage extension on any iPhone device (simulator or real device) all my icons are perfect. However, when I run it on any iPad device (simulator or real device) the default placeholder stays there.
I have tried adding the icons from the sample application but the result is the same for iPad
After breaking my head with every single possible solution with the images, filenames, build phases... I ended up looking at the Info.plist of the extension and discovering that there was a key that was conflicting with the Assets.
I am not sure if that key got there from the initial creation of the project with the XCode 8 beta 1 and if it has been resolved afterwards.
In order to fix the issue just remove this key
CFBundleIcons~ipad
from the Info.plist and your icons will show in your iPad.
I just started developing a game for my new iphone 5 but every time I build it to my device I get this warning in the console.
Application windows are expected to have a root view controller at the end of application launch
I searched the web for a fix but everything I was finding said to put this line of code:
window.rootViewController = rootViewController;
In this method:
-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
But the problem with this is that line of code had to be commented out in cocos2d because it was causing the application to start up in portrait mode no matter what orientation was selected. So does anyone know of a fix for this?
This may not be relevant at all for solving your problem but I struggled with the same error a while ago when I began using iOS 6.0.
I was using the method - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation to do some initializations to my views at launch, but then I found out that it had been deprecated in iOS 6.0 (as mentioned here) resulting in the method never being called as before.
If that's your case you could simply implement the following:
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
[self shouldAutorotateToInterfaceOrientation:toInterfaceOrientation];
}
i have used cocos2d template to create the application. I have created the code to handle iphone and ipad code using if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad condition but whatever option I am selection in simulator iphone or ipad above condition is always failing and always iphone version of code is getting executed. please let me know what setting I am missing. I am using xcode 4.2
check if you app is set as universal. Goto MYGAME at the top of the xcode left colum list, then goto your target, and under IOS Application Target you should find Devices next to it select universal