diff --git a/ion/src/sdl/ios/Info.plist b/ion/src/sdl/ios/Info.plist
index b4541a833..c577a0c3c 100644
--- a/ion/src/sdl/ios/Info.plist
+++ b/ion/src/sdl/ios/Info.plist
@@ -14,14 +14,10 @@
NumWorks Graphing Calculator
CFBundlePackageType
APPL
- CFBundleShortVersionString
- 1.0
CFBundleSupportedPlatforms
iPhoneSimulator
- CFBundleVersion
- 1
DTPlatformVersion
12.1
DTSDKBuild
@@ -30,8 +26,6 @@
iphonesimulator12.1
LSRequiresIPhoneOS
- MinimumOSVersion
- 12.1
UIDeviceFamily
1
diff --git a/ion/src/sdl/ios/Makefile b/ion/src/sdl/ios/Makefile
index 8e6648431..1e0c069b7 100644
--- a/ion/src/sdl/ios/Makefile
+++ b/ion/src/sdl/ios/Makefile
@@ -4,7 +4,6 @@ src += $(addprefix ion/src/sdl/ios/, \
$(call object_for,ion/src/sdl/shared/main.cpp) : SFLAGS += -DEPSILON_SDL_FULLSCREEN=1
-
# Cross-ARCH epsilon.bin
.PHONY: force_remake
@@ -26,10 +25,6 @@ $(BUILD_DIR)/app/entitlements.plist: ion/src/sdl/ios/entitlements.plist
$(Q) plutil -insert "application-identifier" -string "$(IOS_IDENTIFIER).com.numworks.calculator" $@
$(Q) plutil -insert "keychain-access-groups.0" -string "$(IOS_IDENTIFIER).com.numworks.calculator" $@
-$(call ios_resource,icon.png):: ion/src/sdl/assets/logo.svg | $$(@D)/.
- $(call rule_label,CONVERT)
- $(Q) convert -background "#FFB734" $< $@
-
$(call ios_resource,Epsilon): $(patsubst %,$(BUILD_DIR)/%/epsilon.bin,$(ARCHS)) | $$(@D)/.
$(call rule_label,LIPO)
$(Q) lipo -create $^ -output $@
@@ -43,11 +38,16 @@ $(call ios_resource,background.jpg): ion/src/sdl/assets/background.jpg
$(call rule_label,COPY)
$(Q) cp $^ $@
-$(call ios_resource,Info.plist): ion/src/sdl/ios/Info.plist
+$(call ios_resource,Info.plist): ion/src/sdl/ios/Info.plist $(call ios_resource,Assets.car)
$(call rule_label,PLUTIL)
- $(Q) cp $^ $@
- $(Q) plutil -insert "DTPlatformName" -string "$(SDK)" $@
+ $(Q) cp $< $@
+ $(Q) plutil -insert "MinimumOSVersion" -string "$(IOS_MIN_VERSION)" $@
+ $(Q) plutil -insert "DTPlatformName" -string "$(IOS_PLATFORM)" $@
+ $(Q) plutil -insert "CFBundleVersion" -string "$(EPSILON_VERSION).$(PATCH_LEVEL)" $@
+ $(Q) plutil -insert "CFBundleShortVersionString" -string "$(EPSILON_VERSION)" $@
$(foreach arch,$(ARCHS),$(Q) plutil -insert "UIRequiredDeviceCapabilities.0" -string "$(arch)" $@)
+ $(Q) plutil -replace CFBundleIcons -json `plutil -extract CFBundleIcons json -o - $(BUILD_DIR)/app/assets/partial.plist` $@
+ $(Q) plutil -replace CFBundleIcons~ipad -json `plutil -extract CFBundleIcons~ipad json -o - $(BUILD_DIR)/app/assets/partial.plist` $@
$(call ios_resource,launch.storyboardc): ion/src/sdl/ios/launch.storyboard
$(call rule_label,IBTOOL)
@@ -57,16 +57,37 @@ $(call ios_resource,embedded.mobileprovision): $(IOS_PROVISIONNING_PROFILE)
$(call rule_label,COPY)
$(Q) cp $^ $@
-epsion_ipa_deps: $(call ios_resource,\
+asset_for = $(addprefix $(BUILD_DIR)/app/assets/Assets.xcassets/AppIcon.appiconset/,$(1))
+
+icon_assets = $(addsuffix .png,$(addprefix icon_, \
+ 20x20 29x29 40x40 40x40 40x40 58x58 58x58 60x60 76x76 80x80 80x80 87x87 \
+ 120x120 120x120 152x152 167x167 180x180 1024x1024 \
+))
+
+$(call asset_for,Contents.json): ion/src/sdl/ios/icon_assets.json $(call asset_for,$(icon_assets)) | $$(@D)/.
+ $(call rule_label,COPY)
+ $(Q) cp $< $@
+
+$(call asset_for,icon_%.png): ion/src/sdl/assets/logo.svg | $$(@D)/.
+ $(call rule_label,CONVERT)
+ $(Q) convert -background "#FFB734" -resize $* $< $@
+
+$(call ios_resource,Assets.car): $(call asset_for,Contents.json)
+ $(call rule_label,ACTOOL)
+ $(Q) actool --compile $(BUILD_DIR)/app/Payload/Epsilon.app --minimum-deployment-target $(IOS_MIN_VERSION) --platform $(IOS_PLATFORM) --app-icon AppIcon --output-partial-info-plist $(BUILD_DIR)/app/assets/partial.plist $(BUILD_DIR)/app/assets/Assets.xcassets
+
+epsilon_ipa_deps: $(call ios_resource,\
+ Assets.car \
Epsilon.signed \
Info.plist \
background.jpg \
embedded.mobileprovision \
- icon.png \
launch.storyboardc \
)
-$(BUILD_DIR)/app/epsilon.ipa: epsion_ipa_deps
+$(epsilon_ipa_deps): | $$(@D)/.
+
+$(BUILD_DIR)/app/epsilon.ipa: epsilon_ipa_deps
$(call rule_label,ZIP)
$(Q) cd $(dir $@) ; zip -qr9 $(notdir $@) Payload
diff --git a/ion/src/sdl/ios/icon_assets.json b/ion/src/sdl/ios/icon_assets.json
new file mode 100644
index 000000000..f1d8f2867
--- /dev/null
+++ b/ion/src/sdl/ios/icon_assets.json
@@ -0,0 +1,112 @@
+{
+ "images" : [
+ {
+ "idiom" : "iphone",
+ "size" : "20x20",
+ "filename" : "icon_40x40.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "20x20",
+ "filename" : "icon_60x60.png",
+ "scale" : "3x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "29x29",
+ "filename" : "icon_58x58.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "29x29",
+ "filename" : "icon_87x87.png",
+ "scale" : "3x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "40x40",
+ "filename" : "icon_80x80.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "40x40",
+ "filename" : "icon_120x120.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "icon_120x120.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "60x60",
+ "filename" : "icon_180x180.png",
+ "scale" : "3x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "20x20",
+ "filename" : "icon_20x20.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "20x20",
+ "filename" : "icon_40x40.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "29x29",
+ "filename" : "icon_29x29.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "29x29",
+ "filename" : "icon_58x58.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "40x40",
+ "filename" : "icon_40x40.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "40x40",
+ "filename" : "icon_80x80.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "76x76",
+ "filename" : "icon_76x76.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "76x76",
+ "filename" : "icon_152x152.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "83.5x83.5",
+ "filename" : "icon_167x167.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ios-marketing",
+ "size" : "1024x1024",
+ "filename" : "icon_1024x1024.png",
+ "scale" : "1x"
+ }
+ ]
+}
diff --git a/scripts/platform.sdl.ios.mak b/scripts/platform.sdl.ios.mak
index d242ff6ff..4d793d402 100644
--- a/scripts/platform.sdl.ios.mak
+++ b/scripts/platform.sdl.ios.mak
@@ -1,9 +1,12 @@
TOOLCHAIN ?= ios
EXE = bin
-SDK ?= iphonesimulator
+IOS_PLATFORM ?= iphonesimulator
+IOS_MIN_VERSION = 8.0
+IOS_IDENTIFIER ?= unknown
+IOS_PROVISIONNING_PROFILE ?= unknown
-BUILD_DIR := $(BUILD_DIR)/$(SDK)
+BUILD_DIR := $(BUILD_DIR)/$(IOS_PLATFORM)
ifdef ARCH
BUILD_DIR := $(BUILD_DIR)/$(ARCH)