1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2025-12-09 05:29:12 +00:00

Improvements to iOS simulator build documentation

This commit is contained in:
EliteMasterEric 2025-06-03 05:55:35 -04:00
parent af546a14a2
commit 8a3e623d28
3 changed files with 38 additions and 4 deletions

View file

@ -75,5 +75,24 @@ Note that you can only build the game for iOS on a computer running MacOS.
1. Get Xcode from the app store on your MacOS Machine.
2. Download the iPhone SDK (First thing that pops up in Xcode)
3. Open up a terminal tab and run `lime test ios -xcode`
4. You will need to sign your own copy in order to run the game with a real iOS device!
4. You will need to sign your own copy in order to run the game with a real iOS device! That requires an Apple Developer account, sorry!
- To run with an iOS simulator instead of `-xcode` use `-simulator`
### iOS Troubleshooting
- **A required plugin failed to load. Please ensure system content is up-to-date — try running 'xcodebuild -runFirstLaunch'.**
Make sure you have the iOS SDK isntalled, see Step 2.
- **error: No Accounts: Add a new account in Accounts settings. (in target 'Funkin' from project 'Funkin')**
Open XCode, press CMD+, to open Settings, select Accounts, add an Apple ID.
- error: No Account for Team "Z7G7AVNGSH". Add a new account in Accounts settings or verify that your accounts have valid credentials.
Open `project.hxp` and change `IOS_TEAM_ID` to your personal team's ID.
- error: Failed Registering Bundle Identifier: The app identifier "me.funkin.fnf" cannot be registered to your development team because it is not available.
The Funkin' Crew are the only ones that can build an iOS app with the identifier `me.funkin.fnf`. Open `project.hxp` and change `PACKAGE_NAME` to a unique value.
- error: No profiles for 'me.funkin.fnf' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'me.funkin.fnf'

View file

@ -56,7 +56,7 @@ class Project extends HXProject
/**
* A package name used for identifying the app on various app stores.
*/
static final PACKAGE_NAME:String = "me.funkin.fnf";
static final PACKAGE_NAME:String = "me.funkin.fnfxyz100";
/**
* The build's number and version code.
@ -125,6 +125,11 @@ class Project extends HXProject
*/
static final ANDROID_TARGET_SDK_VERSION:Int = 35;
/**
* The team ID to use for the iOS app. Configured in XCode.
*/
static var IOS_TEAM_ID:String = "24PL72Q95R";
/**
* The block size of the ASTC compressed textures.
* Higher block size means lower quality and lighter file size for the generated compressed textures.
@ -437,7 +442,7 @@ class Project extends HXProject
if (isIOS())
{
config.set("ios.non-exempt-encryption", "false");
config.set("ios.team-id", "Z7G7AVNGSH");
config.set("ios.team-id", IOS_TEAM_ID);
launchStoryboard = new LaunchStoryboard();
launchStoryboard.path = "./LaunchScreen.storyboard";
@ -693,7 +698,10 @@ class Project extends HXProject
FEATURE_POLYMOD_MODS.apply(this, true);
FEATURE_FUNKVIS.apply(this, true);
FEATURE_PARTIAL_SOUNDS.apply(this, true);
FEATURE_VIDEO_PLAYBACK.apply(this, true);
// Video playback should be enabled on desktop, web, and mobile.
// HXCPP has trouble with iOS simulator builds though...
FEATURE_VIDEO_PLAYBACK.apply(this, !isIOSSimulator());
// Should be true on debug builds or if GITHUB_BUILD is enabled.
FEATURE_DEBUG_FUNCTIONS.apply(this, isDebug() || GITHUB_BUILD.isEnabled(this));
@ -1167,6 +1175,11 @@ class Project extends HXProject
return this.target == Platform.IOS;
}
public function isIOSSimulator():Bool
{
return this.target == Platform.IOS && this.targetFlags.exists("simulator");
}
public function isHashLink():Bool
{
return this.targetFlags.exists("hl");

View file

@ -127,6 +127,7 @@ class IntroSubState extends MusicBeatSubState
*/
function onLightsEnd():Void
{
#if (html5 || hxvlc)
if (vid != null)
{
#if hxvlc
@ -136,6 +137,7 @@ class IntroSubState extends MusicBeatSubState
vid.destroy();
vid = null;
}
#end
FlxG.camera.zoom = 1;