Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS Sample (not yet working) #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion Gjallarhorn.Bindable.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.12
VisualStudioVersion = 15.0.27130.2010
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".paket", ".paket", "{63297B98-5CED-492C-A5B7-A5B4F73CF142}"
ProjectSection(SolutionItems) = preProject
Expand Down Expand Up @@ -78,6 +78,8 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "WpfCollectionManager", "sam
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WpfElmInspiredOneCSharp", "samples\ElmInspiredOne\WpfElmInspiredOneCSharp\WpfElmInspiredOneCSharp.csproj", "{726DB885-7A1E-43FE-BDBB-94B09E92B883}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ElmInspiredOneXF.iOS", "samples\ElmInspiredOne\ElmInspiredOneXF.iOS\ElmInspiredOneXF.iOS.csproj", "{B94E6239-AE19-4A43-923C-AB464EFFD9C3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Ad-Hoc|Any CPU = Ad-Hoc|Any CPU
Expand Down Expand Up @@ -442,6 +444,28 @@ Global
{726DB885-7A1E-43FE-BDBB-94B09E92B883}.Release|iPhone.Build.0 = Release|Any CPU
{726DB885-7A1E-43FE-BDBB-94B09E92B883}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{726DB885-7A1E-43FE-BDBB-94B09E92B883}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{B94E6239-AE19-4A43-923C-AB464EFFD9C3}.Ad-Hoc|Any CPU.ActiveCfg = Release|iPhone
{B94E6239-AE19-4A43-923C-AB464EFFD9C3}.Ad-Hoc|Any CPU.Build.0 = Release|iPhone
{B94E6239-AE19-4A43-923C-AB464EFFD9C3}.Ad-Hoc|iPhone.ActiveCfg = Release|iPhone
{B94E6239-AE19-4A43-923C-AB464EFFD9C3}.Ad-Hoc|iPhone.Build.0 = Release|iPhone
{B94E6239-AE19-4A43-923C-AB464EFFD9C3}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{B94E6239-AE19-4A43-923C-AB464EFFD9C3}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{B94E6239-AE19-4A43-923C-AB464EFFD9C3}.AppStore|Any CPU.ActiveCfg = Release|iPhone
{B94E6239-AE19-4A43-923C-AB464EFFD9C3}.AppStore|Any CPU.Build.0 = Release|iPhone
{B94E6239-AE19-4A43-923C-AB464EFFD9C3}.AppStore|iPhone.ActiveCfg = Release|iPhone
{B94E6239-AE19-4A43-923C-AB464EFFD9C3}.AppStore|iPhone.Build.0 = Release|iPhone
{B94E6239-AE19-4A43-923C-AB464EFFD9C3}.AppStore|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{B94E6239-AE19-4A43-923C-AB464EFFD9C3}.AppStore|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
{B94E6239-AE19-4A43-923C-AB464EFFD9C3}.Debug|Any CPU.ActiveCfg = Debug|iPhone
{B94E6239-AE19-4A43-923C-AB464EFFD9C3}.Debug|iPhone.ActiveCfg = Debug|iPhone
{B94E6239-AE19-4A43-923C-AB464EFFD9C3}.Debug|iPhone.Build.0 = Debug|iPhone
{B94E6239-AE19-4A43-923C-AB464EFFD9C3}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
{B94E6239-AE19-4A43-923C-AB464EFFD9C3}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
{B94E6239-AE19-4A43-923C-AB464EFFD9C3}.Release|Any CPU.ActiveCfg = Release|iPhone
{B94E6239-AE19-4A43-923C-AB464EFFD9C3}.Release|iPhone.ActiveCfg = Release|iPhone
{B94E6239-AE19-4A43-923C-AB464EFFD9C3}.Release|iPhone.Build.0 = Release|iPhone
{B94E6239-AE19-4A43-923C-AB464EFFD9C3}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
{B94E6239-AE19-4A43-923C-AB464EFFD9C3}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -467,6 +491,7 @@ Global
{10E8B8CC-745C-4548-B45E-C70B7B6EFFA3} = {0387E2FF-28A5-46EE-B99C-DEB15939FB49}
{E08CC0E3-3BF3-4D56-9CBF-88B80CFDDE36} = {0387E2FF-28A5-46EE-B99C-DEB15939FB49}
{726DB885-7A1E-43FE-BDBB-94B09E92B883} = {F9A01AB1-EB25-479C-A869-C98BE21B4FAF}
{B94E6239-AE19-4A43-923C-AB464EFFD9C3} = {1201AA64-1169-4811-AC99-786936FB4882}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4182252C-17A1-4F04-B4E2-84A045EBC91E}
Expand Down
76 changes: 76 additions & 0 deletions samples/ElmInspiredOne/ElmInspiredOneXF.iOS/AppDelegate.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
using UIKit;
using Foundation;
using Gjallarhorn.Bindable.Framework;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the android app, there is a reference to Gjallarhorn.XamarinForms.
I was experimenting with just trying to use Gjallarhorn.Bindable without the XamarinForms...

using Program = ElmInspiredOne.Program;
using ElmInspiredXF;

namespace ElmInspiredOneXF.iOS
{
// The UIApplicationDelegate for the application. This class is responsible for launching the
// User Interface of the application, as well as listening (and optionally responding) to application events from iOS.
[Register("AppDelegate")]
public class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
{
// class-level declarations

public override UIWindow Window
{
get;
set;
}

public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
global::Xamarin.Forms.Forms.Init();
//var info = Framework.CreateApplicationInfo(Program.applicationCore, new MainPage());
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These lines were copied from the Android app shell project.
Unsure the correct interface to load into an iOS application.
is there an interface that can bind to UIApplication somehow?

//var app = info.CreateApp();
//LoadApplication(app);

//Framework.runApplication

// create a new window instance based on the screen size
Window = new UIWindow(UIScreen.MainScreen.Bounds);

// If you have defined a root view controller, set it here:
// Window.RootViewController = myViewController;

// make the window visible
Window.MakeKeyAndVisible();

return base.FinishedLaunching(application, launchOptions);
}

public override void OnResignActivation(UIApplication application)
{
// Invoked when the application is about to move from active to inactive state.
// This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message)
// or when the user quits the application and it begins the transition to the background state.
// Games should use this method to pause the game.
}

public override void DidEnterBackground(UIApplication application)
{
// Use this method to release shared resources, save user data, invalidate timers and store the application state.
// If your application supports background exection this method is called instead of WillTerminate when the user quits.
}

public override void WillEnterForeground(UIApplication application)
{
// Called as part of the transiton from background to active state.
// Here you can undo many of the changes made on entering the background.
}

public override void OnActivated(UIApplication application)
{
// Restart any tasks that were paused (or not yet started) while the application was inactive.
// If the application was previously in the background, optionally refresh the user interface.
}

public override void WillTerminate(UIApplication application)
{
// Called when the application is about to terminate. Save data, if needed. See also DidEnterBackground.
}
}
}


Loading